<template>
    <view class="repairP" >
            <view style="padding:1rem">

         <u-navbar :is-back="true"  :custom-back='BackM' title="设备报修" back-text='' >
         <view class="slot-right" style="width: 100%;display: flex;justify-content: flex-end;" >
				<view  @click="repairDetailedM"  style="margin-right: 0.5rem;font-size: 0.78rem;font-family: PingFang SC;font-weight: 300;color: #02B074;" >
                报修记录
                <!-- <img @click="goSettingM" style="width: 1rem;padding: 1rem;" src="../../style/image/my/A20.png" alt=""> -->
                </view>
			</view>
         </u-navbar>

            <view  class="repairLists"  v-for="(item,index) in repairLists" :key="index" >
                        <view class="repairLists-child"  >
                             <view class="repairLists-head">
                                    <view style="
font-size: 0.78rem;
font-family: PingFang SC;
font-weight: 400;
margin:0.3rem 0rem;
color: #000000;" >拉卡拉总代理<span style="
font-size: 0.78rem;
font-family: PingFang SC;
font-weight: 400;
color: #000000;" >(17765566765)</span> </view>
                                    <view style="
font-size: 0.78rem;
font-family: PingFang SC;
font-weight: 300;
margin:0.3rem 0rem;
color: #343434;" >
                                        报修设备：<span style="font-size: 0.78rem;
font-family: PingFang SC;
font-weight: 300;
color: #343434;" >12345678</span>
                                    </view>
                                     <view style="
font-size: 0.78rem;
font-family: PingFang SC;
font-weight: 300;
margin:0.3rem 0rem;
color: #343434;" >
                                        报修时间：<span style="font-size: 0.78rem;
font-family: PingFang SC;
font-weight: 300;
color: #343434;" >2019-08-23  12:34</span>
                                    </view>
                                       <view style="
font-size: 0.78rem;
font-family: PingFang SC;
font-weight: 300;
margin:0.3rem 0rem;
color: #343434;" >
                                        地址：<span style="font-size: 0.78rem;
font-family: PingFang SC;
font-weight: 300;
color: #343434;" >安徽省合肥市瑶海区珍珠路8号区珍珠路8号区珍珠路8号区珍珠路</span>
                                    </view>
                                    <!-- <view>
                                        报修时间：<span>2019-08-23  12:34</span>
                                    </view> -->
                       
                             </view>
                        </view>


                        <view @click="repairSuccess"  :style="{ display: 'flex',justifyContent: 'center',padding: '0.5rem'}">
                            <view class="repairBtn" >维修完成</view>
                        </view>
            </view>
    </view>
             <u-modal v-model="modalShow"   :show-title='false' :show-cancel-button=true :content="content"></u-modal>

            </view>
    </view>
</template>

<script lang='ts' >

 import { Component, Prop,Vue, Watch ,Emit} from 'vue-property-decorator'


 @Component({     //   @Component  是一个装修器   不可以在下面写语句
        name: 'test',
    })


    export default class extends Vue {
 
     @Prop({
            type: String, // 父组件传递给子组件的数据类型
            required: false, // 是否必填
            default: ' ' // 默认值， 如果传入的是 Object，则要 default: ()=>({}) 参数为函数
        }) msg!:string;
       

       public modalShow =false
       public content='确认已维修完成？'
       public repairLists=[
        {
            mainTitle:'拉卡拉总代理',

        },
        {
            mainTitle:'拉卡拉总代理',

        }
       ]
         created() {
          }

          mounted() {
              //  console.log('父组件传递的参数:',this.$parent)   //暂时不考虑
          }

          repairDetailedM(){

              uni.navigateTo({
      url: '../equipment/repairNotes',
    });

          }

          BackM(){
           console.log(888)
     uni.navigateTo({
　　  url:'../equipment/index',
      animationType:'pop-in', //跳转动画  默认值为 pop-in,  可以的值 pop-in、pop-out、none、auto 等。。。
  　　animationDuration:200,//设置窗口显示/关闭动画的持续时间，单位为 ms
　　success:function(res){

　　},
　　fail:function(res){

　　}
})

   
          }

          repairSuccess(){
                console.log(123)
                this.modalShow=true

          }

    }
</script>

<style  scoped>

.repairP{
    /* padding: 1rem; */
    background-color: #f3f5f7;
    height: 100vh;
}

.repairLists{

 background-color: white;
 margin-bottom: 1rem;
 border-radius: 0.2rem;
 /* padding: 1rem; */
 
 }
 
 .repairLists-child{
 
  border-bottom: 1px solid #E5E5E5;
 }
.repairLists-head{
   padding: 1rem;
}

.repairBtn{
width: 4.5rem;
height: 1.5rem;
background: #FFFFFF;
border: 1px solid #02AF74;
border-radius: 0.3rem;
font-size: 0.78rem;
font-family: PingFang SC;
font-weight: 300;
color: #02B074;
text-align: center;
align-items: center;
line-height: 1.5rem;

}
</style>